# 字符串常用方法
s1 = "helloWorld"
new_s1 = s1.lower()
print(new_s1)

new_s2 = s1.upper()
print(new_s2)

e_mail = 'chl@126.com'
lst = e_mail.split('@')
print(lst[0], lst[1])

print(s1.count('o'))
print(s1.find('o'))

print(s1.find('p'))

print(s1.index('o'))
# print(s1.index('p'))

print('test01.py'.endswith('py'))
print('test01.py'.endswith('php'))

print(s1.startswith('hello'))

s2='helloworld'
s3=s2.replace('o','你好')
print(s3)

s3=s2.replace('o','你', 1)
print(s3)

print(s2.center(20))
print(s2.center(20, '*'))

s4='    Hello    '
print(s4.strip())
print(s4.lstrip())
print(s4.rstrip())

